﻿using System.Collections.Generic;
using BLL.Services.Users.Listing;

namespace BLL.Services.Users
{
    public interface IUsersService
    {
        /// <summary>
        /// Gets the user by id.
        /// </summary>
        /// <param name="userId">The user id.</param>
        User GetUserById(int userId);

        /// <summary>
        /// Creates the specified user.
        /// </summary>
        /// <param name="user">The user.</param>
        void Create(User user);

        /// <summary>
        /// Saves the specified user.
        /// </summary>
        /// <param name="user">The user.</param>
        void Save(User user);

        /// <summary>
        /// Deletes the specified user id.
        /// </summary>
        /// <param name="userId">The user id.</param>
        void Delete(int userId);

        bool ValidateUser(int userId, string email, string login);

        /// <summary>
        /// Gets the user by email or login.
        /// </summary>
        /// <param name="userName">Name of the user.</param>
        User GetUserByEmailOrLogin(string userName);

        /// <summary>
        /// Gets the user listing.
        /// </summary>
        /// <param name="page">The page.</param>
        /// <param name="size">The size.</param>
        /// <param name="column">The column.</param>
        /// <param name="direction">The direction.</param>
        /// <param name="filter">The filter.</param>
        UserListing GetUserListing(int page, int size, string column, int direction, UserFilter filter);

        IEnumerable<User> GetAllUsers { get; }
    }
}